from PyQt4 import QtCore, QtGui
from about_ui import Ui_About

class AboutDialog(QtGui.QDialog):
    def __init__(self, process):
        QtGui.QDialog.__init__(self)
        self.ui = Ui_About()
        self.ui.setupUi(self)
        strAbout = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n" \
        "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n" \
        "p, li { white-space: pre-wrap; }\n" \
        "</style></head><body style=\" font-family:\'Sans Serif\'; font-size:9pt; font-weight:400; font-style:normal;\">\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">daePlotter:</span> DAE Tools 1.0.5</p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Copyright:</span> Dragan Nikolic, 2010</p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">E-mail:</span> <a href=\"dnikolic@daetools.com\"><span style=\" text-decoration: underline; color:#0000ff;\">dnikolic@daetools.com</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Homepage:</span>  <a href=\"www.daetools.com\"><span style=\" text-decoration: underline; color:#0000ff;\">www.daetools.com</span></a>  </p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Licence: </span><a href=\"http://www.gnu.org/licenses/gpl.html\"><span style=\" text-decoration: underline; color:#0000ff;\">GNU GPL version 3</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">DAE Tools is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <a href=\"http://www.gnu.org/licenses\"><span style=\" text-decoration: underline; color:#0000ff;\">www.gnu.org/licenses</span></a>.</p>\n"  \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Third party libraries:</span> </p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> DAE Tools use the following third party free software libraries:</p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Sundials IDA <a href=\"https://computation.llnl.gov/casc/sundials/main.html\"><span style=\" text-decoration: underline; color:#0000ff;\">https://computation.llnl.gov/casc/sundials/main.html</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Boost <a href=\"http://www.boost.org\"><span style=\" text-decoration: underline; color:#0000ff;\">www.boost.org</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - ADOL-C <a href=\"https://projects.coin-or.org/ADOL-C\"><span style=\" text-decoration: underline; color:#0000ff;\">https://projects.coin-or.org/ADOL-C</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - pyQt4 <a href=\"http://qt.nokia.com, http://www.riverbankcomputing.co.uk/software/pyqt/intro\"><span style=\" text-decoration: underline; color:#0000ff;\">www.riverbankcomputing.co.uk/software/pyqt/intro</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Numpy <a href=\"http://numpy.scipy.org\"><span style=\" text-decoration: underline; color:#0000ff;\">numpy.scipy.org</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Trilinos Amesos <a href=\"http://trilinos.sandia.gov/packages/amesos\"><span style=\" text-decoration: underline; color:#0000ff;\">trilinos.sandia.gov/packages/amesos</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - SuperLU <a href=\"http://crd.lbl.gov/~xiaoye/SuperLU/index.html\"><span style=\" text-decoration: underline; color:#0000ff;\">crd.lbl.gov/~xiaoye/SuperLU/index.html</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Umfpack <a href=\"http://www.cise.ufl.edu/research/sparse/umfpack\"><span style=\" text-decoration: underline; color:#0000ff;\">www.cise.ufl.edu/research/sparse/umfpack</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">DAE Tools use the following proprietary software libraries:</p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Amd ACM <a href=\"http://www.amd.com/acml\"><span style=\" text-decoration: underline; color:#0000ff;\">www.amd.com/acml</span></a></p>\n" \
        "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"> - Intel MKL: <a href=\"http://software.intel.com/en-us/articles/intel-mkl\"><span style=\" text-decoration: underline; color:#0000ff;\">software.intel.com/en-us/articles/intel-mkl</span></a></p>\n" \
        "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p></body></html>"
        self.ui.textEdit.setHtml(QtGui.QApplication.translate("About", strAbout, None, QtGui.QApplication.UnicodeUTF8))
